<%@page import="com.hrs.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="order by 01yuanma.com" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>人力资源后台管理</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">

<!-- Add custom CSS here -->
<link href="css/sb-admin.css" rel="stylesheet">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<!-- Page Specific CSS -->
<link rel="stylesheet"
	href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css">
</head>

<body>

	<div id="wrapper">

		<!-- Sidebar -->
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-ex1-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="index.html">人力资源后台管理</a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse navbar-ex1-collapse">
			<ul class="nav navbar-nav side-nav">
				<li><a href="index.do"><i class="fa fa-user"></i>首页</a></li>
				<li><a href="userShow.do?p=1"><i class="fa fa-dashboard"></i>用户管理</a></li>
				<li class="active"><a href="empShow.do?p=1"><i
						class="fa fa-bar-chart-o"></i> 员工管理</a></li>
				<li><a href="trainShow.do?p=1"><i class="fa fa-bar-chart-o"></i>
						培训管理</a></li>
			</ul>

			<ul class="nav navbar-nav navbar-right navbar-user">
				<li class="dropdown user-dropdown"><a href="#"
					class="dropdown-toggle" data-toggle="dropdown"> <i
						class="fa fa-user"></i> <%=((User) session.getAttribute("USER_SESSION")).getUsername()%>
						<b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li class="divider"></li>
						<li><a href="exit.do"><i class="fa fa-power-off"></i> 退出</a></li>
					</ul></li>
			</ul>
		</div>
		<!-- /.navbar-collapse --> </nav>

		<div id="page-wrapper">

			<div class="row">
				<div class="col-lg-12">
					<h1>首页</h1>
					<ol class="breadcrumb">
						<li class="active"><i class="fa fa-dashboard"></i> 用户管理</li>
					</ol>
				</div>
			</div>
			<div class="row">
				<div class="col-lg-12">
					<h1>
						<a href="empAdd.do" class="btn btn-primary">添加员工</a>	
					</h1>
					
				</div>
			</div>
			
			<div class="row">
				<div class="col-lg-12">
					<table class="table table-bordered table-hover tablesorter">
						<thead class="success">
							<tr>
								<th>员工ID</th>
								<th>岗位</th>
								<th>部门</th>
								<th>姓名</th>
								<th>身份证号</th>
								<th>地址</th>
								<th>电话号码</th>
								<th>电子邮箱</th>
								<th>生日</th>
								<th>创建日期</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${pageInfo.list }" var="emp">
								<tr>
									<td>${emp.eid }</td>
									<td>${emp.jname }</td>
									<td>${emp.dname }</td>
									<td>${emp.ename }</td>
									<td>${emp.cardno}</td>
									<td>${emp.address }</td>
									<td>${emp.tel}</td>
									<td>${emp.email }</td>
									<td>${emp.birthday }</td>
									<td>${emp.createdate }</td>
									<td>
										<a href="empModify.do?eid=${emp.eid }&p=${pageInfo.pageNum}"><i class="fa fa-edit"></i></a>
										<a href="empDel.do?eid=${emp.eid }&p=${pageInfo.pageNum}"><i class="fa fa-trash-o"></i></a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
						<tfoot>
				<tr class="success" style="text-align:center;">
					<td colspan="11">
						<p>共有${pageInfo.total }条数据，共${pageInfo.pages }页，当前为${pageInfo.pageNum }页</p>
						<a href="empShow.do?p=1" class="btn btn-primary">首页</a>
						<c:if test="${pageInfo.pageNum eq 1 }">
							<a href="empShow.do" class="btn btn-primary" disabled>上一页</a>
						</c:if>
						<c:if test="${pageInfo.pageNum ne 1 }">
							<a href="empShow.do?p=${pageInfo.pageNum-1 }" class="btn btn-primary">上一页</a>
						</c:if>
						<c:forEach begin="1" end="${pageInfo.pages }" var="p">
							<c:if test="${p eq pageInfo.pageNum }">
								<a href="empShow.do?p=${p }" class="btn btn-primary" disabled="false">${p }</a>
							</c:if>
							<c:if test="${p ne pageInfo.pageNum }">
								<a href="empShow.do?p=${p }" class="btn btn-default">${p }</a>
							</c:if>
						</c:forEach>
						<c:if test="${pageInfo.pageNum eq pageInfo.pages }">
							<a href="empShow.do" class="btn btn-primary" disabled>下一页</a>
						</c:if>
						<c:if test="${pageInfo.pageNum ne pageInfo.pages }">
							<a href="empShow.do?p=${pageInfo.pageNum+1 }" class="btn btn-primary">下一页</a>
						</c:if>
						<a href="empShow.do?p=${pageInfo.pages }" class="btn btn-primary">尾页</a>
					</td>
				</tr>
			</tfoot>
					</table>
				</div>
			</div>
		</div>
		<!-- /#page-wrapper -->

	</div>
	<!-- /#wrapper -->

	<!-- JavaScript -->
	<script src="js/jquery-1.10.2.js"></script>
	<script src="js/bootstrap.js"></script>

	<!-- Page Specific Plugins -->
	<script
		src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
	<script src="http://cdn.oesmith.co.uk/morris-0.4.3.min.js"></script>
	<script src="js/morris/chart-data-morris.js"></script>
	<script src="js/tablesorter/jquery.tablesorter.js"></script>
	<script src="js/tablesorter/tables.js"></script>

</body>
</html>